home *** CD-ROM | disk | FTP | other *** search
- Path: colossus.holonet.net!russell
- From: russell@news.mdli.com (Russell Blackadar)
- Newsgroups: comp.lang.c++
- Subject: Re: overloading []
- Date: 19 Jan 1996 03:49:38 GMT
- Organization: HoloNet National Internet Access System: 510-704-1058/modem
- Message-ID: <4dn4ci$lor@colossus.holonet.net>
- References: <4dgjbl$6i3@news1.goodnet.com> <4dmh30$p7s@fw.bluestone.com>
- NNTP-Posting-Host: jubal.mdli.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- isaac reitman (isaac) wrote:
- : You should do it in the follow way:
- : *f[1] = 10;
-
- Oops, no. *f is the object whose operator[] you want to call.
- Since * has lower precedence, you need to have parentheses, as
- others have already pointed out:
-
- (*f)[1] = 10;
-
- --
- Russell Blackadar, russell@mdli.com
-